package uy.com.csi.gestpro.model.mantenimiento;

import java.io.Serializable;
import java.util.List;

import javax.persistence.*;

import uy.com.csi.gestpro.model.proyecto.GpPrsnalPrycto;
import uy.com.csi.gestpro.model.seguridad.GpUsrio;

/**
 * The persistent class for the gp_prsnal database table.
 * 
 */
@Entity
@Table(name = "gp_prsnal", schema="mantenimiento")
@NamedQuery(name = "GpPrsnal.findAll", query = "SELECT g FROM GpPrsnal g")
public class GpPrsnal implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private Integer id;

	private String aplldos;

	private String nmbre;

	// bi-directional many-to-one association to GpCrgo
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "id_crgo")
	private GpCrgo gpCrgo;

	// bi-directional many-to-one association to GpCrgo
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "id_usrio")
	private GpUsrio gpUsrio;
	
	// bi-directional many-to-one association to GpPrsnalPrycto
	@OneToMany(mappedBy = "gpPrsnal")
	private List<GpPrsnalPrycto> gpPrsnalPryctos;

	public GpPrsnal() {
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAplldos() {
		return this.aplldos;
	}

	public void setAplldos(String aplldos) {
		this.aplldos = aplldos;
	}

	public String getNmbre() {
		return this.nmbre;
	}

	public void setNmbre(String nmbre) {
		this.nmbre = nmbre;
	}

	public GpCrgo getGpCrgo() {
		return this.gpCrgo;
	}

	public void setGpCrgo(GpCrgo gpCrgo) {
		this.gpCrgo = gpCrgo;
	}

	public List<GpPrsnalPrycto> getGpPrsnalPryctos() {
		return gpPrsnalPryctos;
	}

	public void setGpPrsnalPryctos(List<GpPrsnalPrycto> gpPrsnalPryctos) {
		this.gpPrsnalPryctos = gpPrsnalPryctos;
	}

	public GpUsrio getGpUsrio() {
		return gpUsrio;
	}

	public void setGpUsrio(GpUsrio gpUsrio) {
		this.gpUsrio = gpUsrio;
	}

}